# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: PelPix <kylebloss@pelpix.info>
# Contributor: DrZaius <lou[at]fakeoutdoorsman[dot]com>

pkgname=libfdk-aac
pkgver=2.0.2
pkgrel=1
pkgdesc='Fraunhofer FDK AAC codec library'
arch=(loong64 x86_64)
url=https://sourceforge.net/projects/opencore-amr/
license=(custom)
makedepends=(git)
provides=(libfdk-aac.so)
source=(git+https://github.com/mstorsjo/fdk-aac.git#tag=8003a054c81c45c10fe70a832f02c6985383608f)
sha256sums=(SKIP)

pkgver() {
  cd fdk-aac

  git describe --tags | sed 's/^v//'
}

prepare() {
  cd fdk-aac

  ./autogen.sh
}

build() {
  cd fdk-aac

  ./configure \
    --prefix=/usr \
    --disable-static
  make
}

package () {
  cd fdk-aac

  make DESTDIR="${pkgdir}" install
  install -Dm 644 NOTICE -t "${pkgdir}"/usr/share/licenses/libfdk-aac/
}

# vim: ts=2 sw=2 et:
